<html>
<head><meta charset="utf-8"><title>docker doc warning check hangs · t-cargo · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/index.html">t-cargo</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/docker.20doc.20warning.20check.20hangs.html">docker doc warning check hangs</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="240868982"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/docker%20doc%20warning%20check%20hangs/near/240868982" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Glen De Cauwsemaecker <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/docker.20doc.20warning.20check.20hangs.html#240868982">(May 31 2021 at 20:32)</a>:</h4>
<p>Hi, I am trying to add a CI check to ensure my docs are fine (e.g. contain no warnings). I have the following docker file:</p>
<div class="codehilite"><pre><span></span><code>FROM rust:latest

COPY Cargo.lock ./Cargo.lock
COPY Cargo.toml ./Cargo.toml
COPY src ./src

RUN rustup component add rustfmt
RUN rustup component add clippy

ENTRYPOINT [&quot;cargo&quot;]
</code></pre></div>
<p>This docker file works for all other CI checks, e.g. test, fmt, check, clippy, ...</p>
<p>However when I run my docker command in a manner such as:</p>
<div class="codehilite"><pre><span></span><code>docker run --rm -v $PWD:/code/ -e RUSTDOCFLAGS=&#39;-Dwarnings&#39; cargo-rust doc --no-deps --all-features --verbose --all
</code></pre></div>
<p>Then it just hangs stuck on <code>Downloaded</code> and times out after about 10m. With no other feedback on what went wrong. Running that command on my host system, so outside of docker, it does work just fine. Any idea? The status code is <code>137</code>.</p>



<a name="240869319"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/docker%20doc%20warning%20check%20hangs/near/240869319" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/docker.20doc.20warning.20check.20hangs.html#240869319">(May 31 2021 at 20:38)</a>:</h4>
<p>Maybe try setting the CARGO_LOG environment variable to <code>trace</code> to see some more information.</p>



<a name="240871448"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/docker%20doc%20warning%20check%20hangs/near/240871448" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Glen De Cauwsemaecker <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/docker.20doc.20warning.20check.20hangs.html#240871448">(May 31 2021 at 21:12)</a>:</h4>
<p><a href="/user_uploads/4715/q1rDXCHxiD_96Gog5eGu6Ys5/cargo_doc.log">cargo_doc.log</a> </p>
<p>I am not entirely sure what I would be looking for here? It's a very big log, a lot goes wrong, but I guess a lot is allowed to go wrong, hence why it's debug. So not sure what are the things that go wrong here that shouldn't go wrong and that explain the issue at hand here? Any help if possible? I am still quite new to rust.</p>



<a name="240877618"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/docker%20doc%20warning%20check%20hangs/near/240877618" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/docker.20doc.20warning.20check.20hangs.html#240877618">(May 31 2021 at 22:54)</a>:</h4>
<p><span class="user-mention" data-user-id="416992">@Glen De Cauwsemaecker</span> The problem is that since the project is defined in the root filesystem, Cargo is walking the entire filesystem and internally collecting a list of files.  What it is doing is pretty inefficient, and since there are tens of thousands of files, it never finishes.  I suggest copying your project into a subdirectory.</p>



<a name="240877660"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/docker%20doc%20warning%20check%20hangs/near/240877660" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/docker.20doc.20warning.20check.20hangs.html#240877660">(May 31 2021 at 22:55)</a>:</h4>
<p>The reason it only impacts <code>cargo doc</code> is because cargo has to do change-detection a little differently than when it does with <code>rustc</code> (<code>rustc</code> tells cargo exactly which files it used, whereas <code>rustdoc</code> doesn't).</p>



<a name="240878355"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/docker%20doc%20warning%20check%20hangs/near/240878355" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/docker.20doc.20warning.20check.20hangs.html#240878355">(May 31 2021 at 23:07)</a>:</h4>
<p>Looks like it dives into the <code>/sys/devices</code> directory which is an endless pit.</p>



<a name="240879919"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/docker%20doc%20warning%20check%20hangs/near/240879919" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/docker.20doc.20warning.20check.20hangs.html#240879919">(May 31 2021 at 23:44)</a>:</h4>
<p>Filed <a href="https://github.com/rust-lang/cargo/issues/9528">https://github.com/rust-lang/cargo/issues/9528</a></p>



<a name="240907292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/docker%20doc%20warning%20check%20hangs/near/240907292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Glen De Cauwsemaecker <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/docker.20doc.20warning.20check.20hangs.html#240907292">(Jun 01 2021 at 08:04)</a>:</h4>
<p>Ok thank you! that works :) Thank you very much for the help, and glad that it at least led to a newly discovered bug. I can confirm that working within a subdir make it work smoothly and fast! Thank you!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>